<div class="row justify-content-center">
    <div class="col-8">
        <form name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm">
            <h2 id="jhi-order-item-heading">Create or edit a Order Item</h2>

            <div>
                <jhi-alert-error></jhi-alert-error>

                <div class="form-group" [hidden]="!editForm.get('id')!.value">
                    <label for="id">ID</label>
                    <input type="text" class="form-control" id="id" name="id" formControlName="id" readonly />
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_orderId">Order Id</label>
                    <input type="number" class="form-control" name="orderId" id="field_orderId"
                           formControlName="orderId"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_itemId">Item Id</label>
                    <input type="number" class="form-control" name="itemId" id="field_itemId"
                           formControlName="itemId"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_itemCode">Item Code</label>
                    <input type="text" class="form-control" name="itemCode" id="field_itemCode"
                           formControlName="itemCode"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_itemName">Item Name</label>
                    <input type="text" class="form-control" name="itemName" id="field_itemName"
                           formControlName="itemName"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_itemTypeId">Item Type Id</label>
                    <input type="number" class="form-control" name="itemTypeId" id="field_itemTypeId"
                           formControlName="itemTypeId"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_itemTypeName">Item Type Name</label>
                    <input type="text" class="form-control" name="itemTypeName" id="field_itemTypeName"
                           formControlName="itemTypeName"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_offset">Offset</label>
                    <input type="text" class="form-control" name="offset" id="field_offset"
                           formControlName="offset"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_shortProfile">Short Profile</label>
                    <input type="text" class="form-control" name="shortProfile" id="field_shortProfile"
                           formControlName="shortProfile"/>
                </div>

                <div class="form-group">
                    <label class="form-control-label" for="field_profile">Profile</label>
                    <input type="text" class="form-control" name="profile" id="field_profile"
                           formControlName="profile"/>
                </div>
            </div>

            <div>
                <button type="button" id="cancel-save" class="btn btn-secondary" (click)="previousState()">
                    <fa-icon icon="ban"></fa-icon>&nbsp;<span>Cancel</span>
                </button>

                <button type="submit" id="save-entity" [disabled]="editForm.invalid || isSaving" class="btn btn-primary">
                    <fa-icon icon="save"></fa-icon>&nbsp;<span>Save</span>
                </button>
            </div>
        </form>
    </div>
</div>
